package com.pig.graduate.domain.event;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.Serializers;
import com.pig.graduate.domain.BaseEntity;
import com.pig.graduate.domain.CustomDateTimeSerializer;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 
 * @TableName event_entry
 */
@TableName(value ="event_entry")
@Data
public class EventEntry extends BaseEntity implements Serializable {
    /**
     * 进场日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING ,pattern ="yyyy-MM-dd HH:mm:ss")
    private Date entryDate;

    /**
     * 耳号
     */
    private String earCode;

    /**
     * 所在栋舍
     */
    private Long buildingsId;
    @TableField(exist = false)
    private String buildingsName;
    /**
     * 所在位置
     */
    private Long columnId;
    @TableField(exist = false)
    private String columnName;

    /**
     * 所在位置
     */
    @TableField(exist = false)
    private String location;

    /**
     * 进场类型
     */
    private String entryType;

    /**
     * 操作人员
     */
    private Long operatorsUser;
    @TableField(exist = false)
    private String operatorsUserName;
    /**
     * 数量
     */
    private Integer number;

    /**
     * 日龄
     */
    private String dayAge;

    /**
     * 品种
     */
    private String variety;

    /**
     * 重量
     */
    private Double weight;

    /**
     * 价格
     */
    private BigDecimal price;

    /**
     * 筛选猪
     */
    private Integer entryPigType;

    /**
     * 猪群号
     */
    private String herdsPigsCode;
    /**
     * 出生日期
     */
    @TableField(exist = false)
    @JsonFormat(shape = JsonFormat.Shape.STRING ,pattern ="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date birthDate;

    @TableField(exist = false)
    private Date startEntryTime;

    @TableField(exist = false)
    private Date endEntryTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}